package com.example.jpademo.repository.service;

import com.example.jpademo.domain.DemoUser;
import com.example.jpademo.repository.DemoUserRepository;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName TestClassService
 * @Description TODO
 * @Author zhangrenhao
 * @Date 2024/7/31 9:54
 */
@Service
@AllArgsConstructor
public class DemoUserService {

    private DemoUserRepository demoUserRepository;

    public List<DemoUser> findAll() {
        return demoUserRepository.findAll();
    }

    public List<DemoUser> findByName(String name) {
        return demoUserRepository.findByName(name);
    }
}
